#ifndef BLOCKDEVICES_H
#define BLOCKDEVICES_H

#include <stdio.h>

#include "../types.h"

typedef struct
{
    FILE *f;
    size_t filesize;
} FileBlockDevice;

FileBlockDevice fbd_init(const char *filename);
void fbd_free(FileBlockDevice *fbd);
void fbd_readBlock(FileBlockDevice *fbd, u32 blockNumber, char *outPtr);
u32 fbd_getNumBlocks(FileBlockDevice *fbd);
u32 fbd_getBlockSize();

#endif

